﻿using DomainModel;
using FluentNHibernate.Mapping;

namespace Repository.NHibernate.Mapping
{
    public class SubgroupMap:ClassMap<Subgroup>
    {
        public SubgroupMap()
        {
            Id(x => x.Id).GeneratedBy.Native();
            Map(x => x.GroupNo);
            References<Group>(x => x.Group);
            HasMany<User>(x => x.Students);
        }
    }
}